const path = require("node:path");
const fs = require("node:fs");
const os = require("node:os");
const { BaseCommand } = require("./base");

class TmpdirCommand extends BaseCommand {
    async execute() {
        return fs.mkdtempSync(path.join(os.tmpdir(), this.selfData.name));
    }

    getRequiredParams() {
        return ["name"];
    }
}

module.exports = {
    TmpdirCommand,
};
